package net.onceface.core.domain.enums;

public enum Gender {

	MALE("男"),
	FEMALE("女");

	private String label;

	private Gender(String label) {
		this.label = label;
	}

	public String getLabel() {
		return label;
	}

	public static Gender getByLabel(String label) {
		for (Gender each : Gender.values()) {
			if (each.getLabel().equals(label)) {
				return each;
			}
		}
		return null;
	}
	
	public static void main(String main[]){
		Gender sex = Gender.FEMALE;
		System.out.println(Gender.getByLabel("男"));
		System.out.println(sex);
	}

}
